﻿using System.Collections.Generic;
using System.Text;

public static class CollectionJoin
{
    public static string Join<T>(this ICollection<T> collection)
    {
        StringBuilder result = new StringBuilder();
        result.Append("[");
        foreach (T item in collection)
        {
            result.AppendFormat("{0},",item.ToString());
        }
        if (collection.Count > 0)
        {
            result.Remove(result.Length - 1, 1);
        }
        result.Append("]");
        return result.ToString();
    }
}
